package com.jwsoft.manager.core.gateway.controller.bigScreen;

import com.bifang.engine.assistant.core.domain.AppResponse;
import com.bifang.engine.protect.core.annotation.NoSignCrypto;
import com.jwsoft.manager.common.vo.bigScreen.analysisXq.*;
import com.jwsoft.manager.core.integration.bigScreen.AnalysisSsbmIntegration;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/doc/api/ssbm")
@Tag(name = "大屏实时报名接口", description = "大屏实时报名接口")
public class AnalysisSsbmController {
    @Autowired
    private AnalysisSsbmIntegration analysisSsbmIntegration;

    @Operation(summary = "实时报名汇总信息",description = "实时报名汇总信息")
    @PostMapping(value = "/EduAnalysisSsbm0001", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollHzxxVO> getStuEnrollHzxx(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisSsbmIntegration.getStuEnrollHzxx(vo));
    }

    @Operation(summary = "学生占比",description = "学生占比")
    @PostMapping(value = "/EduAnalysisSsbm0002", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollXszbVO> getStuEnrollXszb(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisSsbmIntegration.getStuEnrollXszb(vo));
    }
    @Operation(summary = "报名人数",description = "报名人数")
    @PostMapping(value = "/EduAnalysisSsbm0003", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<StuEnrollBmrsVO> getStuEnrollBmrs(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisSsbmIntegration.getStuEnrollBmrs(vo));
    }
    @Operation(summary = "乡镇街道排名",description = "乡镇街道排名")
    @PostMapping(value = "/EduAnalysisSsbm0004", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<List<StuEnrollXzjdpmVO>> getStuEnrollXzjdpm(@RequestBody @Validated StuEnrollInVO vo) {
        return AppResponse.successData(analysisSsbmIntegration.getStuEnrollXzjdpm(vo));
    }
    @Operation(summary = "单个学校信息",description = "单个学校信息")
    @PostMapping(value = "/EduAnalysisSsbm0005", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public  AppResponse<StuEnrollDgxxVO> getStuEnrollDgxx(@RequestBody @Validated StuEnrollDgxxInVO vo) {
        return AppResponse.successData(analysisSsbmIntegration.getStuEnrollDgxx(vo));
    }
}
